#!/usr/bin/env python

import argparse
from dropio import client

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument('api_key', nargs = '+', help = 'API key to account for drop removal')
    parser.add_argument('--api_url', help = 'base url used for api calls', default = client._API_URL)

    args = parser.parse_args()
    
    for api_key in args.api_key:
        c = client.DropIoClient(api_key = api_key, api_url = args.api_url)
        for drop in c.get_drops():
            try:
                c.delete_drop(drop = drop)
            except:
                pass
